<?php

namespace Test\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class TrabajoController extends AbstractActionController {

	function inicioAction(){
            return new ViewModel();
	}
	
	function nuevaAction(){            
            $idUno = $this->params()->fromRoute('id1', null);
            $idDos = $this->params()->fromRoute('id2', null);
            $this->layout('layout/layout_1');
            $this->layout()->saludo = 'texto saludo';
            $this->layout()->title = 'Nuevo Titulo';

            return new ViewModel(array(
                'arreglo' => array('uno' => '1', 'dos' => '2'),  
                'nombre' => 'Francisco',
                'varid1' => $idUno,
                'varid2' => $idDos,
            ));
	}
        
        function cargarotravistaAction(){
            $view = 'Test\Controller\Trabajo';
            return $this->forward()->dispatch($view, array('action' => 'inicio'));
        }
}